package rht

import (
	"math/rand/v2"
	"net/http"
	"time"

	"github.com/go-playground/form/v4"
	"github.com/go-playground/validator/v10"
)

var _Validator = validator.New()
var _Rand = rand.New(rand.NewPCG(uint64(time.Now().UnixNano()+rand.Int64N(1024)), rand.Uint64()))
var _queryDecoder = form.NewDecoder()

//httpRequest===========================================================

// trueClientIP 用于存储 "True-Client-IP" HTTP 请求头的规范键名
var trueClientIP = http.CanonicalHeaderKey("True-Client-IP")

// xRealIP 用于存储 "X-Real-IP" HTTP 请求头的规范键名
var xRealIP = http.CanonicalHeaderKey("X-Real-IP")

// xForwardedFor 用于存储 "X-Forwarded-For" HTTP 请求头的规范键名
var xForwardedFor = http.CanonicalHeaderKey("X-Forwarded-For")
var xRequestID = http.CanonicalHeaderKey("X-Request-Id")
var authorization = http.CanonicalHeaderKey("Authorization")
var xCSRFToken = http.CanonicalHeaderKey("X-CSRF-Token")
var headerConnection = http.CanonicalHeaderKey("Connection")

var headerAccept = http.CanonicalHeaderKey("Accept")
var headerAcceptEncoding = http.CanonicalHeaderKey("Accept-Encoding")
var headerAcceptLanguage = http.CanonicalHeaderKey("Accept-Language")

var headerContentType = http.CanonicalHeaderKey("Content-Type")
var headerContentDisposition = http.CanonicalHeaderKey("Content-Disposition")
var headerContentTypeJson = http.CanonicalHeaderKey("application/json; charset=utf-8")
var headerContentTypeXml = http.CanonicalHeaderKey("application/xml; charset=utf-8")
var headerContentTypeTextPlain = http.CanonicalHeaderKey("text/plain; charset=utf-8")
var headerContentTypeHTML = http.CanonicalHeaderKey("text/html; charset=utf-8")
